
%%
   
%package uha.ensisa.jordanVoegtlin.chart.interpreter
%class Lexer
%line
%column
%cup

%%
[ \t\f]					{ }
\r\n|\r|\n				{ return getSymbolFactory().newSymbol ("EOLN", Sym.EOLN); }
"->"					{ return getSymbolFactory().newSymbol ("CONTINUE", Sym.CONTINUE); }

"CREATE"				{ return getSymbolFactory().newSymbol ("CREATE", Sym.CREATE); }
"TITLE"					{ return getSymbolFactory().newSymbol ("TITLE", Sym.TITLE); }
"FILE"					{ return getSymbolFactory().newSymbol ("FILE", Sym.FILE); }
"AXISLABEL"				{ return getSymbolFactory().newSymbol ("AXISLABEL", Sym.AXISLABEL); }
"ORIENTATION"			{ return getSymbolFactory().newSymbol ("ORIENTATION", Sym.ORIENTATION); }
"DIMENSION"				{ return getSymbolFactory().newSymbol ("DIMENSION", Sym.DIMENSION); }
"DATA"					{ return getSymbolFactory().newSymbol ("DATA", Sym.DATA); }
"["						{ return getSymbolFactory().newSymbol ("BEGIN", Sym.BEGIN); }
"]"						{ return getSymbolFactory().newSymbol ("END", Sym.END); }
"SAVE"					{ return getSymbolFactory().newSymbol ("SAVE", Sym.SAVE); }
"DISPLAY"				{ return getSymbolFactory().newSymbol ("DISPLAY", Sym.DISPLAY); }
"QUIT"					{ return getSymbolFactory().newSymbol ("QUIT", Sym.QUIT); }
"BAR"					{ return getSymbolFactory().newSymbol ("BAR", Sym.BAR); }
"PIE"					{ return getSymbolFactory().newSymbol ("PIE", Sym.PIE); }
"SERIE"					{ return getSymbolFactory().newSymbol ("SERIE", Sym.SERIE); }
::[#A-Za-z_ ]*			{ return getSymbolFactory().newSymbol ("COMMENT", Sym.COMMENT, new String(yytext()).substring(2, yytext().length())); }

"png"					{ return getSymbolFactory().newSymbol ("PNG", Sym.PNG); }
"jpg"					{ return getSymbolFactory().newSymbol ("JPG", Sym.JPG); }
   
[0-9]+      				{ return getSymbolFactory().newSymbol ("INTEGER", Sym.INTEGER, new Integer(yytext())); }
[0-9.]+[0-9]+      			{ return getSymbolFactory().newSymbol ("DOUBLE", Sym.DOUBLE, new Double(yytext())); }
[#A-Za-z_][#A-Za-z.0-9]*	{ return getSymbolFactory().newSymbol ("STRING", Sym.STRING, new String(yytext())); }
:[#A-Za-z.0-9 ]*:	{ return getSymbolFactory().newSymbol ("STRING", Sym.STRING, new String(yytext()).substring(1, yytext().length()-1)); }
[^]                    { throw new Error("Illegal character <"+yytext()+">"); }
